﻿<%@ Register TagPrefix="ucCommon" TagName="Common" Src="../Common/Inc/Common.ascx" %>
<%@ Register TagPrefix="ucTop" TagName="Top" Src="../Common/Inc/Top.ascx" %>
<%@ Register TagPrefix="ucMenu" TagName="Menu" Src="../Common/Inc/Menu.ascx" %>
<%@ Register TagPrefix="ucTabTitle" TagName="TabTitle" Src="../Common/Inc/TabTitle.ascx" %>
<%@ Register TagPrefix="ucCopyright" TagName="Copyright" Src="../Common/Inc/Copyright.ascx" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Crd2010r.aspx.cs" Inherits="Updms.Crd.Crd2010r" validateRequest="false" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>▒ UPDMS [Crd2010r] ▒▒▒▒▒▒▒▒▒▒</title>
<ucCommon:Common id="Common" runat="server"></ucCommon:Common>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager runat="server" id="ScriptManager1" EnableScriptGlobalization="true"></asp:ScriptManager>

<table id="table_frame">
	<tr>
		<td id="top_area" colspan="2">
			<!-- Top 시작 -->
			<ucTop:Top id="Top" runat="server"></ucTop:Top>
			<!-- Top 끝 -->	
		</td>
	</tr>
	<tr>
		<td id="menu_area" runat="server">
			<!-- 메뉴 시작 -->
			<ucMenu:Menu id="Menu" runat="server"></ucMenu:Menu>
			<!-- 메뉴 끝 -->
		</td>
		<td id="contents_area">
			<!-- 제목 시작 -->
			<ucTabTitle:TabTitle id="TabTitle" TagPrefixs="Crd2010r" runat="server"></ucTabTitle:TabTitle>
			<!-- 제목 끝 -->
			<!-- AJAX 시작 -->
			<asp:UpdatePanel ID="UpdatePanel1" runat="server">
			<Triggers>
				<asp:PostBackTrigger ControlID="ibtn_excel"/>
				<asp:PostBackTrigger ControlID="ibtn_close"/>
			</Triggers>
			<ContentTemplate>
			<!-- 버튼 시작 -->
			<div class="button_area">
				<asp:linkbutton id="ibtn_excel" Text="엑셀" runat="server" CssClass="ibtn ibtn_excel" OnClick="ibtn_excel_Click"></asp:linkbutton>
				<asp:linkbutton id="ibtn_ftp" Text="아이폰" runat="server" CssClass="ibtn ibtn_phone" OnClientClick="return chkFtpTransfer();" OnClick="ibtn_ftp_Click"></asp:linkbutton><asp:CheckBox id="cb_bulk_upload_yn" ToolTip="일괄업로드여부" style="float:left;padding:4px 0 0 2px;" Checked="false" runat="server" />
				<asp:linkbutton id="ibtn_close" Text="닫기" runat="server" CssClass="ibtn ibtn_close" OnClientClick="javascript:window.close();return false;"></asp:linkbutton>
				<asp:linkbutton id="ibtn_confirm" Text="확정" runat="server" OnClick="ibtn_confirm_Click"></asp:linkbutton>
				<asp:linkbutton id="ibtn_verify" Text="검증" runat="server" CssClass="ibtn ibtn_verify" OnClientClick="javascript:viewVerify();return false;"></asp:linkbutton>
				<asp:linkbutton id="ibtn_search" Text="검색" runat="server" CssClass="ibtn ibtn_search" OnClick="ibtn_search_Click"></asp:linkbutton>
			</div>
			<!-- 버튼 끝 -->
			<!-- 검색 시작 -->
			<table class="table_search">
				<tr>
					<td class="lbl" width="8%"><asp:Literal id="ltr_search_card_cd" Text="카드" runat="server" /></td>
					<td class="ctl" width="17%"><asp:dropdownlist id="ddl_search_card_cd" runat="server" AutoPostBack="True" CssClass="ddl" OnSelectedIndexChanged="ddl_search_card_cd_SelectedIndexChanged"></asp:dropdownlist></td>
					<td class="lbl" width="8%"><asp:Literal id="ltr_search_paymnt_dt" Text="결제일" runat="server" /></td>
					<td class="ctl" width="17%">
						<ul class="horizontal">
							<li style="width:50%;"><asp:dropdownlist id="ddl_search_paymnt_dt" runat="server" CssClass="ddl"></asp:dropdownlist></li>
							<li style="width:40%;padding:0 0 0 1px;"><asp:linkbutton id="ibtn_prev_month" ToolTip="전월" runat="server" OnClick="ibtn_prev_month_Click"><img src="../Common/Images/arrow_rect_left.gif" alt="전월" /></asp:linkbutton> <asp:linkbutton id="ibtn_this_month" ToolTip="당월" runat="server" OnClick="ibtn_this_month_Click"><img src="../Common/Images/control_rect_stop.gif" alt="당월" /></asp:linkbutton> <asp:linkbutton id="ibtn_next_month" ToolTip="차월" runat="server" OnClick="ibtn_next_month_Click"><img src="../Common/Images/arrow_rect_right.gif" alt="차월" /></asp:linkbutton></li>
						</ul>
					</td>
					<td class="lbl" title="본사지원, 기타(통계미반영)" width="8%"><asp:Literal id="ltr_support_yn" Text="미반영제외" runat="server" /></td>
					<td class="ctl tlpd4" width="17%"><asp:checkbox id="cb_support_yn" runat="server"></asp:checkbox></td>
					<td class="lbl" width="8%"><asp:Literal id="ltr_search_order_by" Text="정렬" runat="server" /></td>
					<td class="ctl" width="17%"><asp:DropDownList id="ddl_search_order_by" runat="server" CssClass="ddl"></asp:DropDownList></td>
				</tr>
			</table>
			<!-- 검색 끝 -->
			<div style="width:100%">
			<!-- 디테일1 시작 -->
			<table class="table_detail">
				<tr>
					<td class="ctl" style="text-align:center;" rowspan="3" width="10%"><img id="img_card_image" alt="" height="60" runat="server" /></td>
					<td class="lbl" width="15%"><asp:Literal id="ltr_bnk_nm" Text="결제계좌" runat="server" /></td>
					<td class="ctl" width="30%"><asp:label id="lbl_bnk_nm" runat="server"></asp:label></td>
					<td class="lbl" width="15%"><asp:Literal id="ltr_accnt_num" Text="계좌번호" runat="server" /></td>
					<td class="ctl" width="30%"><asp:label id="lbl_accnt_num" runat="server"></asp:label></td>
				</tr>
				<tr>
					<td class="lbl"><asp:Literal id="ltr_mass_dt" Text="사용기간" runat="server" /></td>
					<td class="ctl"><asp:label id="lbl_mass_dt" runat="server"></asp:label> [ <asp:label id="lbl_mass_ins" runat="server"></asp:label> ]</td>
					<td class="lbl"><asp:Literal id="ltr_limit_use" Text="사용한도" runat="server" /></td>
					<td class="ctl"><asp:Label ID="lbl_limit_use" runat="server" Text=""></asp:Label></td>
				</tr>
				<tr>
					<td class="lbl"><asp:Literal id="ltr_cash_dt" Text="사용기간(현금)" runat="server" /></td>
					<td class="ctl"><asp:label id="lbl_cash_dt" runat="server"></asp:label></td>
					<td class="lbl"><asp:Literal id="ltr_limit_cash" Text="사용한도(현금)" runat="server" /></td>
					<td class="ctl"><asp:Label ID="lbl_limit_cash" runat="server" Text=""></asp:Label></td>
				</tr>				
			</table>
			<!-- 디테일1 끝 -->
			<!-- 리스트셋 시작 -->
			<table cellpadding="0" cellspacing="0" border="0" width="100%">
				<tr>
					<td>
						<!-- 리스트 시작 -->
						<asp:GridView ID="GridView1" CssClass="table_gridview" GridLines="None" runat="server" AutoGenerateColumns="False" OnRowDataBound="GridView1_RowDataBound" DataKeyNames="View_Order,Account">
							<Columns>
								<asp:BoundField DataField="View_Order" Visible="False" HeaderText="View_Order(X)" />
								<asp:BoundField DataField="Biz_Dt" HeaderText="결제일" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Center" />
								</asp:BoundField>
								<asp:BoundField DataField="Biz_Div_Nm" HeaderText="결제구분" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Center" />
								</asp:BoundField>
								<asp:BoundField DataField="Account_Nm" HeaderText="계정" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Left" />
								</asp:BoundField>
								<asp:BoundField DataField="Contents" HeaderText="결제내용" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Left" />
									<HeaderStyle CssClass="lbtn_rc" />
								</asp:BoundField>
								<asp:BoundField DataField="Remark" HeaderText="상세내용" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Left" />
									<HeaderStyle CssClass="balloon" />
								</asp:BoundField>
								<asp:BoundField DataField="Use_Amount" HeaderText="결제금액" DataFormatString="{0:#,##0}" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Right" />
								</asp:BoundField>
								<asp:BoundField DataField="Ins_Total_Cnt" HeaderText="총차수" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Center" />
								</asp:BoundField>
								<asp:BoundField DataField="Ins_Cnt" HeaderText="입금회차" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Center" />
								</asp:BoundField>
								<asp:BoundField DataField="Amount" HeaderText="당월금액" DataFormatString="{0:#,##0}" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Right" />
								</asp:BoundField>
								<asp:BoundField DataField="Ins_Balance" HeaderText="잔액" DataFormatString="{0:#,##0}" HtmlEncode="False" >
									<ItemStyle HorizontalAlign="Right" />
								</asp:BoundField>
							</Columns>
							<EmptyDataTemplate>
								<div id="no_data"></div>
							</EmptyDataTemplate>
						</asp:GridView>
						<!-- 리스트 끝 -->
					</td>
				</tr>
			</table>
			<!-- 리스트셋 끝 -->
			</div>			
			<!-- 리스트셋 끝 -->
			<!-- 카피라이트 시작 -->
			<ucCopyright:Copyright id="Copyright" runat="server"></ucCopyright:Copyright>
			<!-- 카피라이트 끝 -->
			<!-- 히든값 시작 -->
			<div id="hdn_data">
				<asp:label id="lbl_pk" runat="server"></asp:label>
				<asp:Label id="lbl_search_flag" runat="server"></asp:Label>
			</div>
			<!-- 히든값 끝 -->
			</ContentTemplate>
			</asp:UpdatePanel>
			<!-- AJAX 끝 -->
		</td>
	</tr>
</table>

<asp:updateprogress AssociatedUpdatePanelID="UpdatePanel1" ID="updateProgress" runat="server">
	<progresstemplate>
		<div id="progressBackgroundFilter"></div>
		<div id="processMessage">
			<div id="processing"></div>
			<img src="../Common/Images/processing_img.gif" />
		</div>
	</progresstemplate>
</asp:updateprogress>

</form>
<script type="text/javascript" language="javascript" defer="defer">
	//대쉬보드 팝업
	function viewDashboard() {
		var card_cd = $F("ddl_search_card_cd");
		var paymnt_dt = $F("ddl_search_paymnt_dt");

		var url = "../Crd/Crd3010p.aspx?page_mode=P&kw1=" + card_cd + "&kw6=" + paymnt_dt;
		popupPage(url, 960, 740, 'yes', 'yes', 'yes');
	}

	//검증
	function viewVerify() {
		var card_cd = $F("ddl_search_card_cd");
		var paymnt_dt = $F("ddl_search_paymnt_dt");

		var url = "../Crd/Crd4010b.aspx?page_mode=P&kw1=" + card_cd + "&kw2=" + paymnt_dt;
		popupPage(url, 960, 740, 'yes', 'yes', 'yes');
	}
	
	//확정
	function chkConfirm(ls_card_nm, ls_paymnt_dt) {
		msgBox.confirm(getMsg(MSG_CFM_004, [ls_card_nm, ls_paymnt_dt]), doConfirm); //@, @일자 확정처리 하시겠습니까?
		return false;
	}
	
	function doConfirm() {
		if (isMsgBoxYes()) {
			__doPostBack('ibtn_confirm','');
		}
	}

	//FTP전송
	function chkFtpTransfer() {
		var isBulk = $("cb_bulk_upload_yn");
		var msgId = MSG_CFM_025; //전송하시겠습니까?
		if (isBulk.checked) {
			msgId = MSG_CFM_024; //일괄로 전송하시겠습니까?
		}

		msgBox.confirm(getMsg(msgId), doFtpTransfer); 
		return false;
	}
</script>
</body>
</html>